﻿@model BillBox.Models.PaymentMethod

@{
    ViewBag.Title = "View Payment Method";
    Layout = "~/Views/Shared/_Layout.cshtml";
}


<div class="row main">
    <ol class="breadcrumb">
        <li>@Html.ActionLink("Home", "Index", "Default")</li>
        <li>@Html.ActionLink("Settings", "Index", "Settings")</li>
        <li>@Html.ActionLink("Payment Methods", "ListPaymentMethods", "Settings")</li>
        <li class="active">@Model.Name</li>
    </ol>
    <div class="col-lg-12">
        <!--<h1 class="page-header">View Agent</h1>-->
        <div class="panel panel-default">
            <div class="panel-heading">
                <span>Payment Method Information</span>
                <span>:&nbsp;</span>
                <span>@Html.DisplayFor(m => m.Name)</span>
            </div>
            <div class="panel-body">
                <div class="table-responsive">
                    <table class="table table-striped table-bordered table-hover">
                        <caption>Capture Fields</caption>
                        <thead>
                            <tr>
                                <th>Name</th>
                                <th>Display Name</th>
                                <th>Type</th>
                                <th>Order</th>
                                <th>&nbsp;</th>
                            </tr>
                        </thead>
                        <tbody>
                            @foreach (BillBox.Models.PaymentMethodCaptureField captureField in Model.PaymentMethodCaptureFields)
                            {
                                <tr>
                                    <td>@captureField.Name</td>
                                    @if (captureField.DisplayName != null)
                                    {
                                        <td>@captureField.DisplayName</td>
                                    }
                                    <td>@BillBox.Common.Util.GetFieldType(captureField.Type.GetValueOrDefault())</td>
                                    <td>@captureField.OrderNum</td>
                                    <td>@Html.ActionLink("Edit", "EditPaymentMethodCaptureField", new { captureFieldId = @captureField.PaymentMethodCaptureFieldId })</td>
                                </tr>
                        
                            }
                        </tbody>
                        <tfoot></tfoot>
                    </table>
                </div>
            </div>
            <div class="panel-footer">
                <ul class="details-menu">
                    <li>@Html.ActionLink("Edit", "EditPaymentMethod", new { paymentMethodId = Model.PaymentMethodId }, new { @class = "btn btn-default" })</li>
                    <li>@Html.ActionLink("Add Capture Field", "AddPaymentMethodCaptureField", new { paymentMethodId = Model.PaymentMethodId }, new { @class = "btn btn-default" })</li>
                </ul>
            </div>
        </div>
    </div>
    <!-- /.col-lg-12 -->
</div>
